# -*- ruby -*-

require 'rubygems'
require 'bundler/setup'
require 'rjack-tarpit'

RJack::TarPit.new( 'rjack-jetty-jsp' ).define_tasks

file 'webapps/test.war' => [ 'webapps/test/index.jsp',
                             'webapps/test/WEB-INF/web.xml' ] do
  sh( 'jar cvf webapps/test.war ' +
      '-C webapps/test index.jsp -C webapps/test WEB-INF/web.xml' )
end

desc "Upload RDOC to Amazon S3 (rdoc.gravitext.com/rjack, Oregon)"
task :publish_rdoc => [ :clean, :rerdoc ] do
  sh <<-SH
    aws s3 sync --acl public-read doc/ s3://rjack.gravitext.com/jetty-jsp/
  SH
end
